package lab02.test20;

import java.util.Scanner;

public class Test20 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入字符：");

        //把字符串的非数字全部替换为""打印
        while (input.hasNext()) {
            String str = input.next();
            System.out.println(str.replaceAll("\\D", ""));
        }
        input.close();
    }
}
